package cn.rongdao.jrkabao.model.deposit;

import com.mifengkong.frtools.http.request.HttpFunction;
import com.mifengkong.frtools.util.FRString;

import cn.rongdao.jrkabao.bean.cashadvance.CashAdvanceSuccessBean;
import cn.rongdao.jrkabao.model.api.BaseKaMaoModel;
import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jack on 2017/8/1
 */

public class DepositSuccessModel extends BaseKaMaoModel {

    public static DepositSuccessModel getInstance() {
        return getPresent(DepositSuccessModel.class);
    }

    public void execute(String flowNo, Observer<CashAdvanceSuccessBean> observer) {
        addParamStrings("flow_no", FRString.valueOf(flowNo));
        Observable<CashAdvanceSuccessBean> observable = mServletApi.depositSuccess(mParams).map(new HttpFunction<CashAdvanceSuccessBean>());
        toSubscribe(observable, observer);
    }
}
